﻿using System.Collections;
using UnityEngine;

public class WaitStep : AssetsAction
{
    public float WaitTime;
    float addTime;
    public override void Reset()
    {
        addTime = 0;
        _done = false;
    }
    public override void Update()
    {
        if (!_done)
        {
            addTime+= Time.deltaTime;
            if (addTime >= WaitTime)
            {
                addTime = WaitTime;
                _done = true;
            }
        }
    }
    public override string Tips { get {
            return "等待服务器更新资源:" + ((int)WaitTime).ToString() + "秒";
        } 
    }
    public override float Progress => addTime / WaitTime;
}